Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tech(storybook): add addon @storybook/addon-designs #8269

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

EldarMuhamethanov
Copy link
Contributor

  • Release notes

Изменения

  • Добавил аддон @storybook/addon-designs, который позволяет добавить вкладку, в которой будет открываться фигма с дизайном компонента
  • Добавил мапу названия компонентов на урл к дизайну в фигме. Сделал мапу, чтобы все урлы лежали удобно в одном месте
  • Добавил функцию createStoryParameters, которая скрывает детали составления параметров для стори. В данный момент эта функция добавляет ссылку на дизайн из мапы, если у данного компонента есть ссылка на дизайн. В будущем данная функция возможно будет скрывать дополнительную логику
  • Прошелся по компонентам и их стори, и добавил использования функции createStoryParameters, так чтобы в будущем было бы удобнее менять/добавлять ссылки на дизайн к любому компоненту.

Release notes

Документация

  • в storybook был добавлен аддон @storybook/addon-designs, который позволяет открывать страницу с дизайном компонента

@EldarMuhamethanov EldarMuhamethanov added this to the v7.2.0 milestone Feb 13, 2025
@EldarMuhamethanov EldarMuhamethanov self-assigned this Feb 13, 2025
@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner February 13, 2025 13:25
Copy link

codesandbox-ci bot commented Feb 13, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

github-actions bot commented Feb 13, 2025

size-limit report 📦

Path Size
JS 397.03 KB (0%)
JS (gzip) 120.61 KB (0%)
JS (brotli) 99.12 KB (0%)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.63 KB (0%)
CSS (gzip) 43.16 KB (0%)
CSS (brotli) 34.51 KB (0%)

Copy link
Contributor

github-actions bot commented Feb 13, 2025

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Feb 13, 2025

👀 Docs deployed

Commit 5e6bbcd

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.54%. Comparing base (2bb7778) to head (5e6bbcd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8269   +/-   ##
=======================================
  Coverage   95.54%   95.54%           
=======================================
  Files         404      404           
  Lines       11640    11640           
  Branches     3857     3857           
=======================================
  Hits        11121    11121           
  Misses        519      519           
Flag Coverage Δ
unittests 95.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andrey-medvedev-vk andrey-medvedev-vk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отличная работа 👏

@@ -0,0 +1,149 @@
export const COMPONENTS_TO_FIGMA_COMMON_DESIGN_URL: Record<string, string> = {
ActionSheet:
'https://www.figma.com/design/AdjYPPaNtrl0ZitenZgO0h/VKUI-Common-Library-%5BBeta%5D-(Community)?node-id=24799-204331&t=zm7u5mIujRMo61aB-0',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У нас когда-то давно была уже идея запилить ссылки на дизайн, но проблема в том, что ссылки на ноду не постоянные и не понятно, как следить за их актуальностью х)

Но в любом случае параметр после node-id разве обязательный? Вот этот &t=zm7u5mIujRMo61aB-0? По-моему, это вообще какая-то внутренняя штука, которая для каждого своя

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Просто на некоторых страницах в фигме есть дизайны для нескольких других компонентов. И чтобы открывалась не вся страница, а только определенный frame я копировал ссылки на определенные frame-ы

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Но для открытия определенного компонента нужно же только node-id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А, я понял. Да, действительно достаточно node-id. Я просто копировал ссылку из браузера, а фигма зачем-то добавляет этот query-параметр. Сейчас убрал, все норм работает

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

3 participants